#!/sbin/openrc-run

name="haproxy-dataplaneapi"
description="HAProxy Data Plane API"

: ${command_user="root:root"}

pidfile="/run/$RC_SVCNAME.pid"
command="/usr/sbin/dataplaneapi"
command_args="-f $CONFIGFILE"
command_background="yes"

depend() {
	need net
	after firewall
}

start_pre() {
	checkpath -d --owner "$command_user" --mode 0755 \
		/var/log/dataplaneapi
}
